1. Field of the Invention
The present invention relates generally to digital image processing and, more particularly, to improved techniques for accessing image data when processing (e.g., filtering) digital images.
2. Description of the Background Art
Today, digital imaging, particularly in the form of digital cameras, is a prevalent reality that affords a new way to capture photos using a solid-state image sensor instead of traditional film. A digital camera functions by recording incoming light on some sort of sensing mechanisms and then processes that information (basically, through analog-to-digital conversion) to create a memory image of the target picture. A digital camera's biggest advantage is that it creates images digitally thus making it easy to transfer images between all kinds of devices and applications. For instance, one can easily insert digital images into word processing documents, send them by e-mail to friends, or post them on a Web site where anyone in the world can see them. Additionally, one can use photo-editing software to manipulate digital images to improve or alter them. For example, one can crop them, remove red-eye, change colors or contrast, and even add and delete elements. Digital cameras also provide immediate access to one's images, thus avoiding the hassle and delay of film processing. All told, digital photography is becoming increasingly popular because of the flexibility it gives the user when he or she wants to use or distribute an image.
In order to generate an image of quality that is roughly comparable to a conventional photograph, a substantial amount of information must be captured and processed. For example, a low-resolution 640×480 image has 307,200 pixels. If each pixel uses 24 bits (3 bytes) for true color, a single image takes up about a megabyte of storage space. As the resolution increases, so does the image's file size. At a resolution of 1024×768, each 24-bit picture takes up 2.5 megabytes. Because of the large size of this information, digital cameras usually do not store a picture in its raw digital format but, instead, apply compression technique to the image so that it can be stored in a standard compressed image format, such as JPEG (Joint Photographic Experts Group). Compressing images allows the user to save more images on the camera's “digital film,” such as flash memory (available in a variety of specific formats) or other facsimile of film. It also allows the user to download and display those images more quickly.
Current memory architecture in widespread use for storing/processing digital images (e.g., synchronous DRAMs—SDRAMs) is optimized for sequential data access in a horizontal manner, such as page-based or row-based access. For example, in the SDRAM memory commonly employed in PCs, horizontal access may be achieved on the order of 7-10 nanoseconds. This speed results from a pre-fetch pipelining mechanism, which is optimized for fetching the next data element (e.g., machine word) in a given row (“page”). Vertical access (e.g., accessing a pixel value below), in contrast, requires around 120 nanoseconds, a ten-fold increase in access cost. This increased cost results from the time-intensive task of switching to another row of memory cells. Here, the underlying memory access mechanism must be reconfigured to switch to the next memory page to access the next group of bits.
One approach to mitigating the above limitation of current memory architecture is to employ alternative memory architecture—that is, forego use of RAM that is page oriented. One such example is static RAM (SRAM). Unfortunately, that approach has distinct disadvantages in terms of greatly increased cost, power requirements, and larger chip size. It is instead advantageous to find a solution that may be implemented using less-costly page-based memory architecture, if such a solution is possible.
Often in digital image processing, it is necessary to apply various two-dimensional filters, which may be of varying sizes and varying data access requirements. Accordingly, it would be advantageous to have an approach that supports random types of two-dimensional image processing applications. Traditionally, the foregoing has been addressed in terms of software-implemented techniques.
With DRAM architecture, it is easy to work in the horizontal but difficult to work in the vertical, due to the previously described problems encountered with page-oriented memory. Additionally, for digital imaging applications embodied in low-cost devices, one usually employs a small, low-cost processor with a limited address space. At the same time, however, the images to be processed are relatively large and easily exceed the scope of the processor's address space. To make a filter or image processing application as efficient as possible (e.g., operates in the least amount of time, with the lowest consumption of power), it is desirable to have a mechanism that provides image data in an easy to use format, rather than a format that requires a device to retrieve each element (e.g., pixel value) of the image data separately.
One approach to the problem is to provide a FIFO-based (i.e., first-in, first-out) solution, such as described in U.S. Pat. No. 5,748,178 to Drewry. In that approach, the system basically processes “FIFOs” of data. However, that approach does not address the general aspects of the problem described above as a FIFO-based approach constrains the number of implementations available. For example, for a three-line FIFO implementation, one is restricted to performing filters that operate on three vertical elements. Further, for purely FIFO-based implementations, a system must take the incoming data and must pre-implement the mechanisms for the width of the filter. There is no easy way to process the image vertically, such as moving a horizontal FIFO filter in the vertical space to deal with vertical elements.
Because of the foregoing limitations of existing approaches, a better solution is sought. What is needed is an easy-to-implement mechanism that is efficient in terms of image processing speed and power consumption, yet does not require expensive or esoteric hardware. Further, the solution should have general applicability to image processing—that is, it should not place too many constraints or restrictions on the nature or size of the image data. The present invention fulfills this and other needs.